#include "ActorData.h"
const AssetType ActorData::m_ActorDataType = "ActorData";

bool ActorData::Restore()
{
	return true; // nothing to restore here
}
bool ActorData::Release()
{
	return true; // nothing to release here
}


ActorPtr ActorData::CreateActor()
{
	ActorPtr actor(RE_NEW BaseActor(REL()->VGenerateActorId()));
	AssetDataList::iterator i = ActorData::m_Children.begin();
	while(i != m_Children.end())
	{
		//create the components and attach them.
		actor->VAddComponent(dynamic_cast<ComponentData*>((*i).get())->CreateComponent(actor));
		++i;
	}
	return actor;
}